package com.agnes.network.sample;

import android.app.Activity;

import com.agnes.network.callback.RespCallbackImpl;

import java.util.List;

/**
 * Desc:
 * Creator ling
 * Date:   2017/12/27 0027 15:24
 */

public class MyResponseCallback<D> extends RespCallbackImpl<D> {

    public MyResponseCallback(Activity context) {
        this(context, true);
    }

    public MyResponseCallback(Activity context, boolean showLoading) {
        super(context, showLoading);
        mContext = context;
    }


    @Override
    protected void toastErrorMsg(String code, String failureMsg, D data) {
        // 如果不需要吐司，则重写该方法，删除super方法即可
//        ToastManager.showNormal(mContext, failureMsg);
    }

    @Override
    protected void toastErrorMsg(String code, String failureMsg, List<D> dataList) {
        // 如果不需要吐司，则重写该方法，删除super方法即可
//        ToastManager.showNormal(mContext, failureMsg);
    }

    @Override
    protected void onNotLogin() {
//        PageUtils.jumpLoginPage((Activity) mContext);
//        Utils.loginOut();
    }
}
